<admintpl file="header"/></head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <php>
            $disp = I('request.disp');
        </php>
        <if condition="($disp eq '1')">
            <li><a href="{:U('Examine/loan_third')}">第三方催缴列表</a></li>
            <elseif condition="(I('request.disp') eq '2')"/>
            <li><a href="{:U('Examine/cntinued')}">续借未审核列表</a></li>
            <elseif condition="(I('request.disp') eq '3')"/>
            <li><a href="{:U('Examine/loan_last')}">待放款列表</a></li>
            <elseif condition="(I('request.disp') eq 'padtrial')"/>
            <li><a href="{:U('padtrial/index')}">电审未审核列表</a></li>
            <elseif condition="(I('request.disp') eq 'renew_padtrial')"/>
            <li><a href="{:U('padtrial/index')}">续借电审列表</a></li>
            <elseif condition="(I('request.disp') eq 'm1')"/>
            <li><a href="{:U('Examine/loan_overdue_m1')}">逾期M1列表</a></li>
            <elseif condition="(I('request.disp') eq 'm2')"/>
            <li><a href="{:U('Examine/loan_overdue_m2')}">逾期M2列表</a></li>
            <else/>
            <li><a href="{:U('Examine/loan_overdue')}">逾期列表</a></li>
        </if>
        <li class="active"><a>{$order.name}详情</a></li>
        <php>$oid = I('get.id');</php>
        <!--更改后的-->
        <li><a href="{:U('report/user_report360_list',array('id'=>$user['id'],'oid'=>$oid,'is_dis'=>1,'disp'=>$disp))}">{$user.name} 融360信用报告</a></li>
        <li><a href="{:U('report/user_report_pictrue_list',array('id'=>$user['id'],'oid'=>$oid,'is_dis'=>1,'disp'=>$disp))}">{$user.name} 融360用户画像(脱敏)报告</a></li>
        <li><a href="{:U('report/user_report',array('id'=>$user['id'],'oid'=>$oid,'is_dis'=>1,'disp'=>$disp))}">{$user.name} 聚信立信用报告(无融360报告时候使用)</a></li>
        <li><a href="{:U('report/user_report_zc_echo',array('id'=>$user['id'],'oid'=>$oid,'is_dis'=>1,'disp'=>$disp))}">{$user.name} 致诚阿福信用报告</a></li>

    </ul>
    <form class="form-horizontal js-ajax-form" method="post">
        <fieldset>
            <div class="tabbable">
                <div class="tab-content">

                    <fieldset>
                        <div class="control-group">
                            <label class="control-label">姓名</label>
                            <div class="controls">
                                <php>$ds=array('0'=>'<span style="color:red">未认证</span>','1'=>'<span style="color:green">已认证</span>','2'=>'<span style="color:red">认证未通过</span>','3'=>'<span style="color:red">暂时不需要</span>')
                                </php>
                                <label class="control-label" style="width:auto">{$order.name}&nbsp&nbsp&nbsp&nbsp{$ds[$order['account_status']]}</label>
                                <input type="hidden" name="options[id]" value="{$order.id}">
                                <input type="hidden" name="options[user_id]" value="{$order.user_id}">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">手机号码</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.mobile}</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">手机类型</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$user['photo_type']==1?'苹果':'安卓'}</label>
                            </div>

                        </div>
                        <eq name="user.photo_type" value="1">
                            <div class="control-group">
                                <label class="control-label">AppleID</label>
                                <div class="controls">
                                    <label class="control-label" style="width:auto">{$user.apple_id}</label>
                                </div>
                            </div>
                        </eq>
                        <div class="control-group">
                            <label class="control-label">银行卡号</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.silver_card}&nbsp&nbsp&nbsp&nbsp预留手机号码&nbsp&nbsp{$order.silver_number}</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">借款金额</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.amount}元</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">借款天数</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.loan_day}天</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">放款日</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.loan_time}</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">分期数</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.stages}期</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">咨询费</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.interest}元</label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">审核费</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.examine}元</label></div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">顾问费</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.consulting}元</label></div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">到期应还</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.loan_amount}元</label></div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">身份证</label>
                            <div class="controls">
                                <input type="text" value="{$user.identity}">
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label">证件照</label>
                            <div class="controls">
                                <notempty name="user.url">
                                    <a href="javascript:parent.image_preview_dialog('{:sp_get_image_preview_url_qk($user['url'])}');">
                                        <i class="fa fa-photo fa-fw"></i> </a>
                                </notempty>
                                <ul id="photos" class="pic-list unstyled">
                                    <notempty name="user['photos_url']">
                                        <php>$pho=json_decode($user['photos_url'],true)</php>
                                        <foreach name="pho" item="vo">
                                            <php>$img_url=sp_get_image_preview_url($vo);</php>
                                            <li id="savedimage{$key}">
                                                <input id="photo-{$key}" type="hidden" name="photos_url[]" value="{$img_url}">
                                                <img id="photo-{$key}-preview" src="{:sp_get_image_preview_url($vo)}" style="height:36px;width: 36px;" onclick="parent.image_preview_dialog(this.src);">
                                            </li>
                                        </foreach>
                                    </notempty>
                                </ul>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">qq</label>
                            <div class="controls">
                                <input type="text" name="options[qq]" value="{$user.qq}">&nbsp&nbsp&nbsp&nbsp邮箱&nbsp&nbsp<input type="text" name="options[email]" value="{$user.email}"></span>
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label">百度黑名单</label>
                            <div class="controls">
                                <span style="color:blue;">{$user.baidu_blacklist|default='<span class="label label-warning">未命中</span>'}</span>
                                <span class="label label-default">说明：A 极黑，建议直接拒绝;B 黑，可具体视产品情况定，建议拒绝;C 极灰，可列为重点观察名单;D 灰，最弱</span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">百度黑名单类型</label>
                            <div class="controls">
                                <span style="color:blue;">{$user.baidu_blacktype|default='<span class="label label-warning">未命中</span>'}</span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">腾讯黑名单分数</label>
                            <div class="controls">
                                <span style="color:blue;">{$user.tx_blackscore|default='<span class="label label-warning">未命中</span>'}</span>
                                <span class="label label-default">说明：0-100:分值越高数据风险越高。风险度参考区间：0~35：低风险 36~79：中风险 80~100:高风险</span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">腾讯黑名单标签</label>
                            <div class="controls">
                                <span style="color:blue;">{$user.tx_blacktag|default='<span class="label label-warning">未命中</span>'}</span>
                            </div>
                        </div>
                        <div class="control-group">
                            <php>
                                $tmp = json_decode($user['tianji_blacklist'],true); $tmp = $tmp[0];
                            </php>
                            <if condition="$tmp!=false">
                                <label class="control-label">天机黑名单：</label>
                                <div class="controls">
                                    <ul class="list-group" style="width: 50%;margin-left: 0;">
                                        <li class="list-group-item">
                                            <span class="badge">{$tmp.feature1|default="未命中"}</span> 放款时间
                                        </li>
                                        <li class="list-group-item">
                                            <span class="badge">{$tmp.feature2|default="未命中"}</span> 逾期开始时间
                                        </li>
                                        <li class="list-group-item">
													<span class="badge">
														<switch name="tmp.feature3">
															<case value="1">31~60天</case>
															<case value="2">61~90天</case>
															<case value="3">90~120天</case>
															<case value="4">121~150天</case>
															<case value="5">151~180天</case>
															<case value="6">大于181天</case>
															<default/>未命中
														</switch>
													</span> 逾期时长
                                        </li>
                                        <li class="list-group-item">
													<span class="badge">
														<switch name="tmp.feature4">
															<case value="-1">未知</case>
															<case value="1">0~499</case>
															<case value="2">500~1999</case>
															<case value="3">2000~4999</case>
															<case value="4">5000~9999</case>
															<case value="5">大于1万</case>
															<default/>未命中
														</switch>
													</span> 借款金额
                                        </li>
                                        <li class="list-group-item">
													<span class="badge">
														<switch name="tmp.feature5">
															<case value="-1">未知</case>
															<case value="0">未结清</case>
															<case value="1">已结清</case>
															<default/>未命中
														</switch>
													</span> 借款状态
                                        </li>
                                    </ul>
                                </div>
                                <else/>
                                <label class="control-label">天机黑名单</label>
                                <div class="controls"><span class="label label-warning">未命中</span></div>
                            </if>
                        </div>
                        <div class="control-group">
                            <label class="control-label">西瓜分</label>
                            <div class="controls">
                                <span style="color:blue;">{$decision|default='<span class="label label-warning">未命中</span>'}</span>
                                <span class="label label-default">说明：300~850</span></div>
                        </div>

                        <div class="control-group">
                            <label class="control-label">教育水平</label>
                            <div class="controls">
                                <select name="options[education]">
                                    <foreach name="education" item="vo">
                                        <php>$tpl_selected=$user['education']==$vo['education']?"selected":"";</php>
                                        <option value="{$vo.education}" {$tpl_selected}>{$vo.education}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">常住地址</label>
                            <div class="controls">
                                <textarea name="options[useraddr]" rows="4" cols="30">{$user.useraddr}</textarea>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">父亲名字</label>
                            <div class="controls">
                                <input type="text" name="options[parent_f_n]" value="{$user.parent_f_n}"><span class="form-required">&nbsp&nbsp&nbsp&nbsp电话号码&nbsp&nbsp<input type="text" name="options[parent_f_t]" value="{$user.parent_f_t}"></span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">母亲名字</label>
                            <div class="controls">
                                <input type="text" name="options[parent_m_n]" value="{$user.parent_m_n}"><span class="form-required">&nbsp&nbsp&nbsp&nbsp电话号码&nbsp&nbsp<input type="text" name="options[parent_m_t]" value="{$user.parent_m_t}"></span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">同学A</label>
                            <div class="controls">
                                <input type="text" name="options[classm_a_n]" value="{$user.classm_a_n}"><span class="form-required">&nbsp&nbsp&nbsp&nbsp电话号码&nbsp&nbsp<input type="text" name="options[classm_a_t]" value="{$user.classm_a_t}"></span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">同学B</label>
                            <div class="controls">
                                <input type="text" name="options[classm_b_n]" value="{$user.classm_b_n}"><span class="form-required">&nbsp&nbsp&nbsp&nbsp电话号码&nbsp&nbsp<input type="text" name="options[classm_b_t]" value="{$user.classm_b_t}"></span>
                            </div>
                        </div>
                        <br/>
                        <div class="control-group">
                            <label class="control-label">分期详情</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">
                                    <table border="1" style='text-align:center;width:800px' cellpadding='10px'>
                                        <tr>
                                            <th>期数</th>
                                            <th>到期时间</th>
                                            <th>借款状态</th>
                                            <th>分期金额</th>
                                            <th>审核操作</th>
                                        </tr>
                                        <php>$stu_type=array('1'=>'借款中','2'=>'已还款','3'=>'逾期','4'=>'已到期','5'=>'审核中','6'=>'审核不通过','7'=>'驳回','8'=>'放款成功','9'=>'放款不成功','10'=>'待放款')</php>
                                        <foreach name="sub" item="vo">
                                            <tr>
                                                <td>第{$vo.stages}期</td>
                                                <td>{$vo.endtime}</td>
                                                <td>{$stu_type[$vo['status']]}</td>
                                                <td>{$vo.amount}</td>
                                                <td>
                                                    <php>$sel=$vo['status']!=2?'checked="checked"':'disabled'</php>
                                                    <span><input name="options[status][{$vo.stages}]" {$sel} type="radio" value="0" disabled/>借款中</span>&nbsp;&nbsp;&nbsp;&nbsp;
                                                    <php>$sel=$vo['status']==2?'checked="checked" disabled':''</php>
                                                    <span><input name="options[status][{$vo.stages}]" type="radio" {$sel} value="1" disabled/>已还款</span>
                                                </td>
                                            </tr>
                                        </foreach>
                                        <tr>
                                            <td>共{$order.stages}期</td>
                                            <td>{$order.loan_day}天</td>
                                            <td>{$stu_type[$order['status']]}</td>
                                            <td>{$order.amount}</td>
                                            <td></td>
                                        </tr>
                                    </table>
                                </label>
                            </div>
                        </div>
						<if condition="($disp neq '1')">
                        <div class="control-group">
                            <label class="control-label">续期详情</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">
                                    <if condition="(empty($renewal))">
                                        暂无记录
                                        <else/>
                                        <table border="1" style='text-align:center;width:800px' cellpadding='10px'>
                                            <tr>
                                                <th>借款编号</th>
                                                <th>续期时间</th>
                                                <th>完结时间</th>
                                                <th>续期金额</th>
                                                <th>审核备注</th>
                                                <th>状态</th>
                                                <th>审核人</th>
                                            </tr>
                                            <foreach name="renewal" item="vo">
                                                <tr>
                                                    <td>{$vo.order_id}</td>
                                                    <td>{$vo.renewal}</td>
                                                    <td>{$vo.endtime}</td>
                                                    <td>{$vo.amount}</td>
                                                    <td>{$vo.meassage}</td>
                                                    <td>{$vo['status']==1?'审核成功':'审核失败'}</td>
                                                    <td>{$lastuser[$vo['lastuser_id']]|default='系统'}</td>
                                                </tr>
                                            </foreach>
                                        </table>
                                    </if>
                                </label>
                            </div>
                        </div>
						</if>
                        <div class="control-group">
                            <label class="control-label">还款时间</label>
                            <div class="controls">
                                <label class="control-label" style="width:auto">{$order.endtime}</label></div>
                        </div>
						<if condition="($disp neq '1')">
                        <if condition="($log)">
                            <div class="control-group">
                                <label class="control-label">审核信息</label>
                                <div class="controls">
                                    <label class="control-label" style="width:auto">
                                        <table border="1" style='text-align:center;width:800px' cellpadding='10px'>
                                            <tr>
                                                <th>审核类型</th>
                                                <th>审核时间</th>
                                                <th>审核人</th>
                                                <th>审核备注</th>
                                                <th>审核操作</th>
                                            </tr>
                                            <php>$stu_type=array('1'=>'借款中','2'=>'已还款','3'=>'逾期','4'=>'已到期','5'=>'审核中','6'=>'审核不通过','7'=>'驳回','8'=>'放款成功','9'=>'放款不成功','10'=>'待放款'); $stu_ty=array('0'=>'用户审核','1'=>'订单审核','2'=>'用户信息审核','3'=>'续期审核','4'=>'逾期还款(本金)','5'=>'逾期还款','6'=>'订单审核');
                                            </php>
                                            <foreach name="log" item="vo">
                                                <eq name="vo.types" value="2">
                                                    <tr>
                                                        <td>{$stu_ty[$vo['types']]}</td>
                                                        <td>{$vo.crtime}</td>
                                                        <td>{$lastuser[$vo['examine_id']]}</td>
                                                        <td>{$vo.message}</td>
                                                        <td>{$vo['status']?'审核成功':'审核失败'}</td>
                                                    </tr>
                                                </eq>
                                            </foreach>
                                        </table>
                                    </label>
                                </div>
                            </div>
                        </if>
						</if>
                        <if condition="($mobile_list)">
                            <div class="control-group" style='float: left;'>
                                <label class="control-label">手机通讯录
                                    <a href="{:U('Examine/mobile_down',array('id'=>$order['user_id']))}">导出</a></label>
                                <div class="controls">
                                    <label class="control-label" style="width:auto">
                                        <table border="1" style='text-align:center;width:800px' cellpadding='10px'>
                                            <tr>
                                                <th>上传时间</th>
                                                <th>联系人备注姓名</th>
                                                <th>手机号码</th>
                                                <th>手机类型</th>
                                            </tr>
                                            <foreach name="mobile_list" item="vo">
                                                <tr>
                                                    <td>{$vo.crtime}</td>
                                                    <td>{$vo.name}</td>
                                                    <td>{$vo.mobile}</td>
                                                    <td>{$vo['mobile_type']==1?'安卓':'苹果'}</td>
                                                </tr>
                                            </foreach>
                                        </table>
                                    </label>
                                </div>
                                <div class="pagination">{$page}</div>
                            </div>
                        </if>
                    </fieldset>
                </div>
            </div>

            <div class="form-actions">
                <!-- <button class="btn btn-primary js-ajax-submit" type="submit" data-types='1' data-action="{:U('Examine/set_exam',array('display'=>1))}" data-msg='确认已还款?' data-subcheck="true">手工确认还款</button> -->
                <!-- <a class="btn btn-primary js-ajax-submit"  href="{:U('Examine/loan_no_due')}" >返回</a> -->
            </div>
        </fieldset>
    </form>

</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
<script type="text/javascript">
    var ajaxForm_list = $('form.js-ajax-form');
    if (ajaxForm_list.length) {
        Wind.use('ajaxForm', 'artDialog', function () {

            $('button.js-ajax-submit').bind('click', function (e) {

                e.preventDefault();
                /*var btn = $(this).find('button.js-ajax-submit'),
                        form = $(this);*/
                var btn = $(this),
                    form = btn.parents('form.js-ajax-form');

                //批量操作 判断选项
                if (btn.data('subcheck')) {
                    btn.parent().find('span').remove();
                    var msg = btn.data('msg');
                    if (msg) {
                        art.dialog({
                            id: 'warning',
                            icon: 'warning',
                            content: btn.data('msg'),
                            cancelVal: "{:L('CLOSE')}",
                            cancel: function () {

                            },
                            button: [{
                                name: "{:L('OK')}",
                                callback: function () {
                                    ajaxSubmit(btn.data('types'));
                                },
                                focus: true
                            }]
                        });
                    } else {
                        btn.data('subcheck', false);
                        btn.click();
                    }
                    return false;
                }
            });

        });
    }

    function ajaxSubmit(type) {
        var btn = $('button.js-ajax-submit'),
            form = btn.parents('form.js-ajax-form');
        form.ajaxSubmit({
            url: type ? btn.data('action') : form.attr('action'),
            //按钮上是否自定义提交地址(多按钮情况)
            dataType: 'json',
            beforeSubmit: function (arr, $form, options) {
                var tx = type ? '审核通过' : '审核不通过';
                //按钮文案、状态修改
                btn.text(tx + '中...').attr('disabled', true).addClass('disabled');
            },
            success: function (data, statusText, xhr, $form) {
                //按钮文案、状态修改
                btn.removeClass('disabled').parent().find('span').remove();

                if (data.state === 'success') {
                    $('<span class="tips_success">' + data.info + '</span>').appendTo(btn.parent()).fadeIn('slow').delay(1000).fadeOut(function () {
                        if (data.referer) {
                            //返回带跳转地址
                            if (window.parent.art) {
                                //iframe弹出页
                                window.parent.location.href = data.referer;
                            } else {
                                window.location.href = data.referer;
                            }
                        } else {
                            if (window.parent.art) {
                                reloadPage(window.parent);
                            } else {
                                //刷新当前页
                                reloadPage(window);
                            }
                        }
                    });
                } else if (data.state === 'fail') {
                    $('<span class="tips_error">' + data.info + '</span>').appendTo(btn.parent()).fadeIn('fast');

                    btn.text('手工确认还款调整').removeProp('disabled').removeClass('disabled');
                }
            }
        });
    }
</script></html>